import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

/**
 * @author : zzr
 * @description :
 * @date :
 */
public class TestDemo6 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("Hello----");
        list.add("world");
        list.add("hello,,,");
        list.add("lambda");
        list.sort((o1, o2) -> o1.length() - o2.length());
        System.out.println(list);
    }
}
